// Amount Types
export interface RechargeRequest {
  amount: number;
}

export interface RechargeInfo {
  amount: number; // 应支付金额
  auditAt: number; // 审核时间
  auditAtString: string; // 审核时间string
  auditManagerId: number; // 审核管理员id
  commissionFee: number; // 手续费
  createdAt: number; // 创建时间
  createdAtString: string; // 创建时间string
  id: number; // 主键
  memberAddress: string; // 用户充值地址
  memberId: number; // 用户id
  orderSn: string; // 关联订单号
  paid: number; // 已支付金额
  payCallbackStatus: 10 | 40; // 支付状态（回调）[10:待审核;40通过]
  randomMantissa: number; // 随机尾数
  receivedAmount: number; // 实际应到账金额
  rechargeAddress: string; // 充值到账地址
  rechargeExpiredAt: number; // 充值过期时间
  rechargeExpiredAtString: string; // 充值过期时间string
  rechargeType: 1; // 支付币种[1:usdt支付]
  remark: string; // 审核备注
  status: 1 | 10 | 20 | 30 | 40; // 状态[1:待支付，10：充值中，20失败，30取消，40完成]
  statusString: string; // 状态[1:待支付，10：充值中，20失败，30取消，40完成]
  updatedAt: number; // 修改时间
  updatedAtString: string; // 修改时间string
  walletType: number; // 钱包，1:usd(美元账户)
}

export interface RechargeListItem {
  amount: number;
  auditAt: number;
  auditAtString: string;
  auditManagerId: number;
  commissionFee: number;
  createdAt: number;
  createdAtString: string;
  id: number;
  memberAddress: string;
  memberId: number;
  orderSn: string;
  paid: number;
  payCallbackStatus: 10 | 40;
  randomMantissa: number;
  receivedAmount: number;
  rechargeAddress: string;
  rechargeExpiredAt: number;
  rechargeExpiredAtString: string;
  rechargeType: 1;
  remark: string;
  status: 1 | 10 | 20 | 30 | 40;
  statusString: string;
  updatedAt: number;
  updatedAtString: string;
  walletType: 1;
}

export interface WithdrawRequest {
  amount: number;
  currency: string;
  address: string;
  fundPassword: string;
}

export interface WithdrawListItem {
  id: string;
  orderId: string;
  amount: number;
  currency: string;
  address: string;
  status: 'pending' | 'completed' | 'cancelled' | 'rejected';
  createdAt: string;
  completedAt?: string;
  cancelledAt?: string;
  rejectedAt?: string;
  reason?: string;
}

export interface BalanceLogItem {
  id: string;
  amount: string;
  balance: string;
  type: 'in' | 'out';
  scene: number; // 20:充值,30:提现,40:卡充值,100:手续费
  description: string;
  createdAt: string;
  metadata?: Record<string, any>;
}

export interface AddRechageWalletRequest {
  Address: string,
  NetworkId: number
}

export const BALANCE_LOG_SCENE = {
  RECHARGE: 20,
  WITHDRAW: 30,
  CARD_RECHARGE: 40,
  SERVICE_FEE: 100,
} as const;
